package com.rzhkj.box.entity;

/**
 * Created by lixin on 2017/12/18.
 */
public enum BoxStateEnum {
    Enable("启用"),
    Disenable("禁用"),;
    public String val;

    BoxStateEnum(String val) {
        this.val = val;
    }

    /**
     * 任务状态
     *
     * @param stateName
     * @return
     */
    public static BoxStateEnum getEnum(String stateName) {
        for (BoxStateEnum boxStateEnum : BoxStateEnum.values()) {
            if (boxStateEnum.name().equalsIgnoreCase(stateName)) {
                return boxStateEnum;
            }
        }
        return null;
    }

    @Override
    public String toString() {
        return this.name();
    }

}
